﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RedHouse.Data.Entities;
using RedHouse.Data.Base;

namespace RedHouse.Web.UserControls
{
    public partial class UCPromotionDetail : System.Web.UI.UserControl
    {
        public RedHouseNews Promotion { get; set; }
        public List<RedHouse.Data.Image> ImageList { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = Request.QueryString["id"] == null ? string.Empty : Request.QueryString["id"].ToString();
            if (Request.QueryString["id"] != null)
            {
                Initialize(id);
            }
        }

        private void Initialize(string id)
        {
            ImageList = ImageService.Instance.GetAllImageByAssociatedId(new Guid(id));
        }
    }
}